var MessageManager=cc.Class.extend({
	
	messageList:null,
	
	ctor : function(message){
		messageList=message;
	},
	
	addMessage:function(message){
		messageList=messageList.concat(message);
		return messageList;
	},
	
	getMessage:function(){
		if(messageList.length==0)
			return null;
		else {
			return messageList.shift();
		}
	},
	
	getMessageLength:function(){
		return messageList.length;
	}
});

function MMMessage (left,portrait,x,y,text){
	this.left = left;
	this.portrait = portrait;
	this.x = x;
	this.y = y;
	this.text = text;
}
